import java.text.*; class sample { public static void main(String Args[]) { DecimalFormat numberTest = new DecimalFormat("####0.00"); double deee = .0099999; System.out.println(deee); System.out.println(numberTest.format(deee)); }
You need to enable Javascript in your browser to edit pages.
help on how to format text
the first one were to print .0099999
but the second one would print .01